﻿@model MediaSettingsModel

@{
    //page title
    ViewBag.Title = T("Admin.Configuration.Settings.Media").Text;
    //active menu item (system name)
    Html.SetActiveMenuItemSystemName("Media settings");
}

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()
    <div class="content-header clearfix">
        <h1 class="pull-left">
            @T("Admin.Configuration.Settings.Media")
        </h1>
        <div class="pull-right">
            <button type="submit" name="save" class="btn bg-blue">
                <i class="fa fa-floppy-o"></i>
                @T("Admin.Common.Save")
            </button>
        </div>
    </div>

    <div class="content">
        <div class="form-horizontal">
            @Html.Action("SiteScopeConfiguration", "Setting")
            @Html.Action("Mode", "Setting")
            @Html.ValidationSummary(false)

            <div class="panel-group">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.ExtLabelFor(model => model.PicturesStoredIntoDatabase)
                            </div>
                            <div class="col-md-1">
                                <div class="form-text-row">
                                    @if (Model.PicturesStoredIntoDatabase)
                                    {
                                        @T("Admin.Configuration.Settings.Media.PicturesStoredIntoDatabase.Database")
                                    }
                                    else
                                    {
                                        @T("Admin.Configuration.Settings.Media.PicturesStoredIntoDatabase.FileSystem")
                                    }
                                </div>
                            </div>
                            <div class="col-md-8">
                                <button type="submit" id="change-picture-storage" name="change-picture-storage" class="btn btn-primary">
                                    @T("Admin.Configuration.Settings.Media.PicturesStoredIntoDatabase.Change")
                                </button>
                                @Html.ActionConfirmation("change-picture-storage")
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="col-md-9 col-md-offset-3">
                                <span>@T("Admin.Configuration.Settings.Media.PicturesStoredIntoDatabase.Note")</span>
                            </div>
                        </div>                        
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideSiteCheckboxFor(model => model.AvatarPictureSize_OverrideForSite, model => model.AvatarPictureSize, Model.ActiveSiteScopeConfiguration)
                                @Html.ExtLabelFor(model => model.AvatarPictureSize)
                            </div>
                            <div class="col-md-9">
                                @Html.ExtEditorFor(model => model.AvatarPictureSize)
                                @Html.ValidationMessageFor(model => model.AvatarPictureSize)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideSiteCheckboxFor(model => model.MaximumImageSize_OverrideForSite, model => model.MaximumImageSize, Model.ActiveSiteScopeConfiguration)
                                @Html.ExtLabelFor(model => model.MaximumImageSize)
                            </div>
                            <div class="col-md-9">
                                @Html.ExtEditorFor(model => model.MaximumImageSize)
                                @Html.ValidationMessageFor(model => model.MaximumImageSize)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideSiteCheckboxFor(model => model.MultipleThumbDirectories_OverrideForSite, model => model.MultipleThumbDirectories, Model.ActiveSiteScopeConfiguration)
                                @Html.ExtLabelFor(model => model.MultipleThumbDirectories)
                            </div>
                            <div class="col-md-9">
                                @Html.ExtEditorFor(model => model.MultipleThumbDirectories)
                                @Html.ValidationMessageFor(model => model.MultipleThumbDirectories)
                            </div>
                        </div>
                        <div class="form-group advanced-setting">
                            <div class="col-md-3">
                                @Html.OverrideSiteCheckboxFor(model => model.DefaultImageQuality_OverrideForSite, model => model.DefaultImageQuality, Model.ActiveSiteScopeConfiguration)
                                @Html.ExtLabelFor(model => model.DefaultImageQuality)
                            </div>
                            <div class="col-md-9">
                                @Html.ExtEditorFor(model => model.DefaultImageQuality)
                                @Html.ValidationMessageFor(model => model.DefaultImageQuality)
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
}